//
//  IBDButton.h
//  LocalShop
//
//  Created by admin on 16/4/25.
//  Copyright © 2016年 cqsf. All rights reserved.
//

#import <UIKit/UIKit.h>


typedef NS_ENUM(NSUInteger, IBDButtonStyle) {
    IBDButtonStyleDefault,
    IBDButtonStyleLabelAndImage,
    IBDButtonStyleTwoLabel,
    IBDButtonStyleImageAndLabel, // 左边图片 右边文字类型
    IBDButtonStyleImageAndLabel2, // 上边图片 下边文字类型

};

@interface IBDButton : UIView


typedef void(^Action)(IBDButton *button);


@property(strong,nonatomic) NSString *oneTitle;
@property(strong,nonatomic) NSString *twoTitle;
@property (strong,nonatomic) NSString *text;
@property (nonatomic, assign) CGFloat igInster;// 图片和文字的间隔
@property (nonatomic, strong) UIColor *bkColor;

+ (instancetype)cutomBtnFream:(CGRect)frame  andText:(NSString *)text andTextColor :(UIColor *)color andImg:(UIImage *)img;


-(void)addTarget:(id)targets  andAction:(SEL)action;

//========================

@property (strong, nonatomic) UILabel *headLabel; // 上面的Label，实在不知道起啥名字了
@property (strong, nonatomic) UILabel *footLabel; // 下面的Label
@property (strong, nonatomic) UIImageView *imageView;

- (instancetype)initWithFrame:(CGRect)frame style:(IBDButtonStyle)style action:(Action)action;

@property (assign,nonatomic) UIEdgeInsets imageViewInsets;
@property (strong, nonatomic) UIImage *image;
@property (copy, nonatomic) NSString *head;



@end
